package com.wx.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.wx.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;

/**
 * <p>Title:      SysRange. </p>
 * <p>Description 范围表 </p>
 * <p>Copyright: Copyright (c) 2016</p>
 * <p>Company:    医百科技有限公司 </p>
 *
 * @author         yangwensheng@100doc.com.cn
 * @since      2021-03-22 10:51:46
 */
@Table(name = "sys_range")
@Data
@ApiModel(value = "SysRange")
public class SysRange extends BaseEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 范围名称
	 */
	@Column(name = "range_name")
	@ApiModelProperty(value = "范围名称")
	@NotEmpty(message = "范围名称不能为空")
	@ExcelProperty(value = "范围名称", index = 0)
	@ColumnWidth(value = 25)
	private String rangeName;

	/**
	 * 所属护士
	 */
	@Transient
	@ApiModelProperty(value = "所属护士")
	@ExcelProperty(value = "所属护士", index = 3)
	@ColumnWidth(value = 25)
	private String contactsName;

	/**
	 * 联系电话
	 */
	@Transient
	@ApiModelProperty(value = "联系电话")
	@ExcelProperty(value = "联系电话", index = 4)
	@ColumnWidth(value = 25)
	private String phone;

	/**
	 *机构名称
	 */
	@ApiModelProperty(value = "机构名称（用于列表展示）")
	@Transient
	@ExcelProperty(value = "覆盖医院", index = 2)
	@ColumnWidth(value = 25)
	private String hospitalsName;

	/**
	 * 区县名称
	 */
	@ApiModelProperty(value = "区县名称（用于列表展示）")
	@Transient
	@ExcelProperty(value = "管理区域", index = 1)
	@ColumnWidth(value = 25)
	private String areasName;

	/**
	 * 机构集合
	 */
	@Transient
	@ApiModelProperty(value = "机构集合")
	@ExcelIgnore
	private List<String> hospitalIdList;

	/**
	 * 区县集合
	 */
	@Transient
	@ApiModelProperty(value = "区县集合")
	@ExcelIgnore
	private List<String> areaCodeList;


	@Transient
	@ApiModelProperty(value = "护士集合")
	@ExcelIgnore
	private List<String> nurseIdList;

}
